package com.bsoft.gol.hcs.utils;

import org.atag.util.common.SpringPropertiesUtil;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Component;

/**
 * 常量 、 缓存
 *
 * @author lxy
 * @date 2019/9/26
 */
@Component
@DependsOn("springPropertiesUtil")
public class Constants implements InitializingBean {

    public static final String ID_FLAG = "_";
    public static final int PAGE_SIZE = 100;
    public static final String DEFAULT_ORGANIZATION_ID = "1";
    public static final String DEFAULT_ZERO_VALUE = "0";
    /**
     * @Description: 接口类型，GOL 调用健康通，HOL调用互联网医院
     * @Author: zhaorb
     * @Date: 2020/6/22 15:03
     **/
    public static final String GOL = "GOL";
    public static final String HOL = "HOL";
    public static final String EXAMINE_TYPE = "4";
    public static final String CHECK_TYPE = "5";
    public static final String EXAMINE_INDEX_TYPE = "ExamineIndexType";
    public static final String CHECK_INDEX_TYPE = "CheckIndexType";
    public static final String QUERY_CHECK_TYPE_LIST = "/medicalSkills/queryCheckTypeList";
    public static final String QUERY_CHECK_ITEM_LIST = "/medicalSkills/queryCheckItemList";
    public static final String SUBMIT_CHECK_INFO = "/webCloudClinic/submitCheckInfo";
    public static final String QUERY_CHECK_POSITION_LIST = "/medicalSkills/queryCheckPositionList";
    public static final String GET_CHECK_REPORT_FROM= "/medicalSkills/getCheckReportForm";
    public static final String QUERY_MEDICAL_SKILL_LIST= "/medicalSkills/queryMedicalSkillList";
    public static final String GET_APPLY_NO = "/webCloudClinic/getApplyNo";
    public static final String GET_VERIFY_PRESCRIPTION = "/api/auth/prescription/verifyPrescription";
    public static final String GET_HCN_CONSULT_ASK = "/api/auth/medicalSkills/getConsultAsk";
    public static final String GET_HCN_DOCTOR_LIST = "/api/auth/appointment/queryDoctorList";
    public static final String GET_HOL_DOCTOR_LIST = "/api/auth/basDoctor/queryDoctorList";
    public static final String GET_HCN_DOCTOR_USERID_LIST = "/api/auth/appointment/queryDoctorUserIdList";
    public static final String GET_FUS_CONSULT_ID = "/api/auth/consult/getFusConsultId";
    public static final String GET_HCN_DEPT_LIST = "/api/auth/appointment/queryDepartmentList";
    public static final String GET_QUESTIONNAIRE_DETAIL = "/api/auth/editorQuestionnaireTitle/getQuestionnaireDetail";
    public static final String GET_QUESTIONNAIRE_LIST = "/api/auth/editorQuestionnaire/list";
    public static final String GET_QUESTIONNAIRE_ANSWER_LIST = "/api/auth/editorAnswer/answerList";
    public static final String GET_QUESTIONNAIRE_TITLE_LIST = "/api/auth/editorQuestionnaireTitle/titleList";
    public static final String GET_QUESTIONNAIRE_OPTION_LIST = "/api/auth/editorQuestionnaireTitle/optionList";
    public static final String GET_QUESTION_DETAIL = "/api/auth/editorQuestionnaire/detail";

	public static final String SYNC_ANSWER_LIST = "/syncAnswer/list";
	public static final String SYNC_ANSWER_CONFIRM = "/syncAnswer/confirm";
	public static final String LIST_FAMILY = "/api/auth/ainfo/contact/listFamily";
    public static final String GET_SYS_PARAMETER_LIST = "/api/sysParameter/getSysParameterList";
    public static final String GOL_SYS_PARAMETER_LIST = "/api/auth/sysParameter/getSysParameterList";
    public static final String LIST_ORGANATION = "/auth/base/orgList";
    public static final String HOL_LIST_ORGANATION = "/admin/bas/organization/list?t=1";
    public static final String GOL_LIST_ORGANATION = "/api/auth/appointment/findOrganizationList";
    public static final String BASE_DOCTOR = "/api/auth/basDoctor/detail";
    public static final String BASE_UPDATE_DOCTOR = "/admin/bas/doctor/update";
    public static final String BASE_UPDATE_DOCTOR_JKT = "/api/auth/basDoctor/update";

    /*获取医生主职业点*/
    public static final String MAIN_PRACTISE = "/api/auth/basDoctor/doctor/getPractising";

    /*智慧健康通推送消息总汇*/
    public static final String SEND_MESSAGE = "/auth/base/pushMessage";
    public static final String PUSH_NEWMESSAGE = "/auth/base/pushNewMessage";
    public static final String SEND_SATISFACTION_SURVEY_MESSAGE = "/auth/base/sendSatisfactionSurveyMessage";
    public static final String GET_CODE = "/api/auth/base/getIdentifyingCode";
    public static final String VALIDATE_CODE = "/api/auth/base/validateCode";
    /*互联网医院短信验证码相关接口*/
    public static final String HOL_SEND_MESSAGE = "/api/auth4his/message/productionMessage";
    public static final String SENT_SMS_CODE = "/api/util/sentSMSVerificationCode";
    public static final String VERIFY_SMS_CODE = "/api/util/verifySMSCode";
    public static final String GET_COPYWEITERCODE = "/auth/base/queryAllCopywriterConfig";
    public static final String HOL_COPYWEITERCODE = "/api/auth/sysCopywriting/getSysCopywriting";
    public static final String QUERY_INVOICE_LIST = "/invoice/queryInvoiceList";
    public static final String CREAT_INVOICE = "/invoice/createInvoice";
    public static final String QUERY_INVOICE_H5_URL = "/invoice/queryInvoiceH5URL";
    /*获取住院患者列表*/
    public static final String LIST_PATIENT = "/inHospitalPatient/listpatient";
    /*门诊-门诊患者列表*/
    public static final String OUTPATIENT_LIST_PATIENT = "/outpatient/listPatient";
    /*START****************************************门诊用药管理********************************************START*/
    /*获取药品信息*/
    public static final String SYNC_DRUG_INFORMATION = "/webCloudClinic/syncDrugInformation";
    /*查询诊断代码字典*/
    public static final String SYNC_DIAGNOSTIC_INFORMATION = "/webCloudClinic/syncDiagnosticInformation";
    /*获取门诊就诊记录*/
    public static final String GET_VISITING_RECORD = "/webCloudClinic/getVisitingRecord";
    /*更新门诊就诊状态*/
    public static final String UPDATE_VISIT_STATUS = "/webCloudClinic/updateVisitStatus";
    /*保存门诊病历信息*/
    public static final String SAVE_MEDICAL_RECORD_INFORMATION = "/webCloudClinic/saveMedicalRecordInformation";
    /*保存诊断信息*/
    public static final String SAVE_DIAGNOSE_INFORMATION = "/webCloudClinic/saveDiagnoseInformation";
    /*保存处方信息*/
    public static final String SAVE_PRESCRIPTION_INFORMATION = "/webCloudClinic/savePrescriptionInformation";
    /*查询门诊病历信息*/
    public static final String GET_MEDICAL_RECORD_INFORMATION = "/webCloudClinic/getMedicalRecordInformation";
    /*查询药品用法*/
    public static final String GET_DRUG_USAGE = "/webCloudClinic/getDrugUsage";
    /*查询药品使用频率*/
    public static final String GET_DRUG_FREQUENCY = "/webCloudClinic/getDrugFrequency";
    /*查询诊断信息*/
    public static final String GET_DIAGNOSE_INFORMATION = "/webCloudClinic/getDiagnoseInformation";
    /*查询处方信息*/
    public static final String GET_PRESCRIPTION_INFORMATION = "/webCloudClinic/getPrescriptionInformation";
    /*同步药品煎法信息*/
    public static final String GET_DRUG_DECOCTION = "/webCloudClinic/getDrugDecoction";
    /*同步药品脚注信息*/
    public static final String GET_DRUG_FOOTNOTE= "/webCloudClinic/getDrugFootNote";
    //检查
    public static final String UPDATE_CHECK_INFO = "/webCloudClinic/updateCheckInfo";
    /*门诊-获取我的排班*/
    public static final String LIST_ROSTERING = "/rostering/listRostering";
    /*门诊-获取科室排班*/
    public static final String LIST_ROSTERING_DEPT = "/rostering/listRosteringDept";

    public static final String CODE_LIST = "/api/auth/editorDict/codelist";

    //检验
    public static final String QUERY_SPECIMEN_LIST = "/medicalSkills/querySpecimenList";
    public static final String QUERY_INSPECTION_APPLY_NO = "/medicalSkills/queryInspectionApplyNo";
    public static final String CANCEL_INSPECTION_ITEM = "/medicalSkills/cancelInspectionItem";
    public static final String QUERY_INSPECTION_EXTRA_FEE = "/medicalSkills/queryInspectionExtraFee";
    public static final String QUERY_INSPECTION_NOTICE = "/medicalSkills/queryInspectionNotice";
    public static final String QUERY_INSPECTION_ITEM_LIST = "/medicalSkills/queryInspectionItemList";
    public static final String QUERY_INSPECTION_ITEM_DTAIL = "/medicalSkills/queryInspectionItemDtail";
    public static final String SAVE_INSPECTION_INFO = "/medicalSkills/saveInspectionInfo";
    public static final String GET_ORGANIZE_LIST = "getOrganizeList";
    public static final String GET_ORGANIZE_LIST_MSG_TYPE = "ODS_03070001";
    public static final String GET_EXAM_TYPE_LIST = "getExamTypeList";
    public static final String GET_EXAM_TYPE_LIST_MSG_TYPE = "ODS_03070002";
    public static final String GET_EXAM_MAJOR_ITEM_LIST = "getExamMajorItemList";
    public static final String GET_EXAM_MAJOR_ITEM_LIST_MSG_TYPE = "ODS_03070003";
    public static final String GET_EXAM_ITEM_LIST = "getExamItemList";
    public static final String GET_EXAM_ITEM_LIST_MSG_TYPE = "ODS_03070005";
    public static final String GET_REPORT_INFO = "getReportInfo";
    public static final String POST_APPLY_FORM = "postApplyForm";
    public static final String POST_APPLY_FORM_MSG_TYPE = "ODS_03070008";
    public static final String GET_REQUEST_ID_ODS = "getRequestId";
    public static final String GET_REQUEST_ID_ODS_MSG_TYPE = "ODS_03070016";

    public static final String QUERY_APPOINT_ITEM = "queryAppointItem";
    public static final String QUERY_APPOINT_ITEM_MSG_TYPE = "ODS_02070007";
    public static final String QUERY_APPOINT_DATE = "QueryAppointDate";
    public static final String QUERY_APPOINT_DATE_MSG_TYPE = "ODS_02070008";
    public static final String QUERY_APPOINT_TIME = "QueryAppointTime";
    public static final String QUERY_APPOINT_TIME_MSG_TYPE = "ODS_02070009";
    public static final String CONFIRM_APPOINT = "ConfirmAppoint";
    public static final String CONFIRM_APPOINT_MSG_TYPE = "ODS_02070010";
    public static final String CANCEL_APPOINT = "cancelAppoint";
    public static final String CANCEL_APPOINT_MSG_TYPE = "ODS_02070011";
    public static final String BOOK_APPOINT = "bookAppoint";
    public static final String BOOK_APPOINT_MSG_TYPE = "ODS_02070011";

    public static final String GET_REQUEST_ID = "risRequest/getRequestId";
    public static final String RECEIVE_REQUEST = "risRequest/receiveRequest";


    /**-----------------------------------------电子签名开始---------------------------------------*/
    public static final String PDF_TYPE = "application/pdf";
    public static final String ACCESS_TOKEN = "/v1/oauth2/access_token?appId=APP_ID&secret=APP_SECRET&grantType=client_credentials";
    public static final String CREATE_BY_THIRD_PARTY_USER_ID = "/v1/accounts/createByThirdPartyUserId";
    public static final String SIGN_SEALS_IMAGE = "/v1/accounts/ACCOUNT_ID/seals/image";
    public static final String GET_UPLOAD_URL = "/v1/files/getUploadUrl";
    public static final String CREATE_FLOW_ONE_STEP = "/api/v2/signflows/createFlowOneStep";
    public static final String FLOW_ID_START = "/v1/signflows/FLOW_ID/start";
    public static final String FLOW_ID_EXECUTE_URL= "/v1/signflows/FLOW_ID/executeUrl";
    public static final String LOGINAUTH_INFO = "/v1/accounts/loginAuth/info";
    public static final String LOGINTASK_ID = "/v1/signAuth/queryLoginResult?taskId=TASK_ID";
    public static final String AUTHTASK_ID = "/v1/accounts/ACCOUNT_ID/signAuth/queryAuthResult?taskId=TASK_ID";
    public static final String USER_SEALS="/v1/accounts/user/seals";
    public static final String TEXT_HASH_SIGN="/v1/accounts/ACCOUNT_ID/signAuth/textHashSign";


    /**
     * -----------------------------------------电子签名结束---------------------------------------
     */




    /*4.1.1同步就医记录*/
    public static final String GET_RECORDS = "/medicaladvice/getRecords";
    /***********************************************住院费用管理End******************************************************/


    /*==================================================同步门诊记录
    开始===========================================================*/
    //门诊记录
    public static final String OUTPATIENT_VISIT_RECORD = "/medicalRecords/outpatientVisitRecord";
    //住院记录
    public static final String INPATIENT_VISIT_RECORD = "/medicalRecords/inpatientVisitRecord";
    //检验单申请记录
    public static final String INSPECTION_APPLICATION_RECORD = "/medicalRecords/inspectionApplicationRecord";
    //检查单申请记录
    public static final String CHECK_APPLICATION_RECORD = "/medicalRecords/checkApplicationRecord";
    //门诊、住院取药记录
    public static final String DISPENSING_RECORD = "/medicalRecords/dispensingRecord";
    //治疗记录
    public static final String TREATMENT_RECORD = "/medicalRecords/treatmentRecord";
    //手术记录
    public static final String SURGICAL_RECORD = "/medicalRecords/surgicalRecord";
    /*==================================================同步门诊记录
    结束===========================================================*/
    //字典
    public static final String DICTIONATY_RECORD = "/baseData/dictionaryRecord";
    public static String TOKEN = null;
    //    public static String INVOICE_HIS_CLIENT_URL ="http://10.0.38.151:8300";
    public static String INVOICE_HIS_CLIENT_URL = "http://10.0.38.186:8300";
    //    public static String HIS_CLIENT_URL_01 = "http://192.168.100.2:53509/hai/HttpEntry";
//    public static String HIS_CLIENT_URL_01 = "http://weixin.zbzxyy.com/hai/HttpEntry";
    public static String HIS_CLIENT_URL_01 = "";
    public static String GOL_CLIENT_URL = "";
    public static String EDITOR_FOLLOW_UP = "";
    public static String HOL_FAMILY_URL = "";
    public static String HOL_WEB_URL = "";
    public static String GOL_FAMILY_URL = "";
    public static String WHIS_PATH_URL = "";

    @Override
    public void afterPropertiesSet() throws Exception {
        Constants.HIS_CLIENT_URL_01 = SpringPropertiesUtil.get("his_client_url");
        Constants.GOL_CLIENT_URL = SpringPropertiesUtil.get("gol_client_url");
        Constants.EDITOR_FOLLOW_UP = SpringPropertiesUtil.get("editor_follow_up");
        Constants.HOL_FAMILY_URL = SpringPropertiesUtil.get("hol_family_url");
        Constants.HOL_WEB_URL = SpringPropertiesUtil.get("hol_web_url");
        Constants.GOL_FAMILY_URL = SpringPropertiesUtil.get("gol_family_url");
        Constants.WHIS_PATH_URL = SpringPropertiesUtil.get("whis_path_url");
        Constants.COMMON_PROXY_URL = SpringPropertiesUtil.get("common_proxy_url");

    }


    public static String HIS_PATH_URL = "http://10.8.0.95:6062/platform/PacsCenter/";
    public static String PRESCRIPTION_PLATFORM_URL = "http://10.8.2.178:8300/bs-pts/";
    public static String HIS_DRUGSTORE_URL = "http://10.8.2.178:8081/bs-whis/";
    public static int SUCCESS_CODE = 200;
    public static int ERR_CODE = -1;
    public static String JSON_ANALYSIS_ERR = "HIS返回数据JSON解析异常";
    public static String BUILDS_PROFILES = "未查询到就诊人档案，是否在线建档";
    public static String DO_NOT_BUILDS_PROFILES = "未查询到就诊人档案，请到医院窗口建档。";
    public static int QUERY_TIMES = 10;//主动查询重试的最多次数
    public static int INTERVAL_TIME = 1000; //主动查询重试隔间，单位毫秒
    public static int ZORE = 0;
    public static int ONE = 1;
    public static Integer TWO = 2;
    public static Integer THREE = 3;
    public static Integer SIX = 6;
    public static Integer EIGHT = 8;
    public static Integer TEN = 10;
    public static Integer ONE_HUNDRED = 100;

    public static String ZORE_STRING = "0";
    public static String ONE_STRING = "1";
    public static String TWO_STRING = "2";

    //医院平台serviceType
    public static String SERVICE_TYPE_SERVICE = "service";
    //医院平台MsgVersion
    public static String MSG_VERSION = "4.0";

    /*********START*****************抗菌药物管理*****************************************/
    /*获取抗菌药记录列表*/
    public static final String LIST_ANTIBACTERIAL = "/api/auth/hisAntibacterialInfo/listAntibacterial";
    /*获取抗菌药详细信息*/
    public static final String DETAILS = "/api/auth/hisAntibacterialInfo/details";
    /*提交抗菌药审核用量信息*/
    public static final String CONFIRM_MEDICINES = "/api/auth/hisAntibacterialInfo/confirmMedicines";
    /*提交审核意见*/
    public static final String SUB_REASON = "/api/auth/hisAntibacterialInfo/subReason";
    /*获取抗菌药历史列表*/
    public static final String HISTORY_ANTIBACTERIAL = "/api/auth/hisAntibacterialInfo/historyAntibacterial";
    /*获取病区列表*/
    public static final String LIST_PATIENT_AREAS = "/api/auth/hisAntibacterialInfo/listPatientAreas";
    /*获取药品信息(抗菌药物)*/
    public static final String SYNC_DRUGINFORMATION_LIST = "/api/auth/hisAntibacterialInfo/syncDrugInformation";
    /*******END*******************抗菌药物管理*****************************************/

    /**---------------------------------------------------------------项目地址--------------------------------------------------**/
    public static String COMMON_PROXY_URL="";


    /**---------------------------------------------------------------住院患者列表--------------------------------------------------**/
    public static String INPATIENT_DEPT_LIST="/inHospitalPatient/findDocDeptList";

    public static String INPATIENT_PATIENT_LIST="/inHospitalPatient/findInPatientList";

    public static String INPATIENT_PATIENT_DETAIL = "/inHospitalPatient/queryInPatientDetail";

    public static String INHOSPITAL_PATIENT_COUNT = "/inHospitalPatient/queryInHospitalPatientCount";

    public static String INHOSPITAL_PATIENT_APPOINTMENT ="/inHospitalPatient/queryAppointmentInHospitalList";

    public static String INHOSPITAL_PATIENT_APPOINTMENT_DETAIL ="/inHospitalPatient/queryAppointmentInHospitalDetail";

    public static String OUT_PATIENT_DETAIL="/outpatientHospitalization/getPatientInformation";
    public static String OUT_PATIENT_LIST="/outpatientHospitalization/outpatientList";
    public static String OUT_PATIENT_MEDICAL_LIST="/outpatientHospitalization/outpatientMedicalList";
    public static String OUT_PATIENT_PRESCRIPTION_LIST="/outpatientHospitalization/outpatientPrescriptionList";
    public static String IN_PATIENT_MEDICAL_LIST="/outpatientHospitalization/inpatientMedicalList";
    public static String IN_DISCHARGECOST_DETAIL="/outpatientHospitalization/getDischargeCostDetail";
    public static String IN_HOSPITAL_PAYMENT_DATE="/outpatientHospitalization/listHospitalizationPaymentDate";
    public static String IN_PATIENT_ALLADVICE_LIST="/outpatientHospitalization/inpatientAllAdviceList";
    public static String IN_HOSPITAL_LIST_PATIENT="/outpatientHospitalization/inHospitalListpatient";

    public static String HEALTH_RECORDS="/healthRecords/healthRecordsList";
    public static String GET_PATIENT_BY_ID="/temperatureSheet/getPatientById";
    public static String GET_PATIENT_TEMPDATAS="/temperatureSheet/getPatientTempDatas";
    public static String SYNCTEMPLATE_LIST="/healthRecords/exportMedicalRecordType";

    public static String QUERY_CHECK_REPORT_LIST="/checkAndExamReport/queryCheckReportList";
    public static String QUERY_CHECK_REPORT_DETAIL="/checkAndExamReport/queryCheckReportDetail";

    public static String QUERY_EXAM_REPORT_LIST="/checkAndExamReport/queryExamReportList";
    public static String QUERY_EXAM_REPORT_DETAIL="/checkAndExamReport/queryExamReportDetail";
    public static String LIST_DISPOSAL_RECORD="/checkAndExamReport/listDisposalRecord";
    /**-----------------------------------------------------------危急值查询-----------------------------------------------------**/
    public static final String QUERY_CRITICAL_LIST="/queryCritical/findCriticalValue";



    /*********START*****************新冠核酸检测*****************************************/
    /*核酸申请提交*/
    public static final String NATSUBMIT = "/natExamineRecord/natSubmit";
    /*取消核酸申请*/
    public static final String NATCANCEL = "/natExamineRecord/natCancel";
    /*查询申请单信息列表*/
    public static final String NATLIST = "/natExamineRecord/natList";
    /*******END*******************新冠核酸检测*****************************************/
    /*检查开单发送IM消息*/
    public static final String SENDCHECKMESSAGE = "/api/auth/medicalSkills/sendCheckMessage";
    /*检验开单发送IM消息*/
    public static final String SENDEXAMMESSAGE = "/api/auth/medicalSkills/sendExamMessage";
    /*互联网医院历史患者记录*/
    public static final String GETHISTORICALPATIENTLIST = "/api/auth/cloud/doctor/getHistoricalPatientList";
    /*健康通接诊记录记录*/
    public static final String QUERYORDERRECORDLIST = "/hospitalization/queryOrderRecordList";


    /**---------------------------------------------------------------药品类型--------------------------------------------------**/
    public static String DRUG_TYPE_GOL="/dicItem/updateDicItem";
    public static String DRUG_TYPE_HOL="";

    /**********************************检查、检验小项*********************************************************/
    public static String LAB_SET_STACK="/api/auth/hisMedicalTechnology/queryVisitItemDetailList";
    public static String CHECK_SET_STACK="/api/auth/hisMedicalTechnology/queryExamItemDetailList";
    /*查询检查组套列表*/
    public static String QUERY_CHECK_SET_LIST="/api/auth/hisMedicalTechnology/queryCheckSetList";
    /*查询检查组套详情*/
    public static String QUERY_CHECK_SET_DETAIL="/api/auth/hisMedicalTechnology/queryCheckSetDetail";

    public static String HISTORY_DRUG_LIST="/api/auth/historyDrugs/getHistoryDrugs";

    /**--------------------------------------------------------------治疗申请单--------------------------------------------------**/
    public static String TREATMENT_ITEM_TYPE_LIST="/treatmentApplication/findTreatmentItemTypeList";
    public static String GET_TREATMENT_ITEM="/treatmentApplication/getTreatmentItem";
    public static String GET_MERIDIAN_lIST="/treatmentApplication/getMeridianList";
    public static String GET_TREATMENT_SET="/treatmentApplication/getTreatmentSet";
    public static String GET_TREATMENT_SET_DETAIL="/treatmentApplication/getTreatmentSetDetail";
    public static String ADD_TREATMENT_REQUEST="/treatmentApplication/addTreatmentRequest";
    public static String RETURN_TREATREATMENT_REQUEST="/treatmentApplication/returnTreatmentRequest";
    public static String QUERY_TREATMENT_REQUEST="/treatmentApplication/queryTreatmentRequest";
    public static String QUERY_TREATMENT_REPORT="/treatmentApplication/queryTreatmentReport";
}
